home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group93a.txt / 000078_icon-group-sender _Mon Mar 1 20:40:17 1993.msg < prev    next >
Internet Message Format  |  1993-04-21  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 3 Mar 1993 05:04:19 MST
  2. Date: 1 Mar 93 20:40:17 GMT
  3. From: agate!howland.reston.ans.net!spool.mu.edu!olivea!pagesat!spssig.spss.com!uchinews!ellis!goer@ucbvax.Berkeley.EDU  (Richard L. Goerwitz)
  4. Organization: University of Chicago
  5. Subject: Re: environment variables
  6. Message-Id: <1993Mar1.204017.13953@midway.uchicago.edu>
  7. References: <2560.9302282253@desktop.desktop.co.uk>
  8. Sender: icon-group-request@cs.arizona.edu
  9. To: icon-group@cs.arizona.edu
  10. Status: R
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12.  
  13. Steve Holden <steve@dtc.co.uk> writes:
  14. >
  15. >The example you quote of
  16. >
  17. >    system("export DISPLAY=bandit.ucs:0")
  18. >
  19. >doesn't work because system creates a subshell to run its commands in.
  20.  
  21. The results would be operating system independent, actually.  Getenv
  22. itself is, in fact, quite OS dependent.  Your best bet is not to use
  23. it at all.  Using environment variables read-only is okay, as long as
  24. you test for their presence in the implementation (a la &features).
  25. Trying to set environment variables is pretty scary, though :-).
  26.  
  27. -- 
  28.  
  29.    -Richard L. Goerwitz              goer%midway@uchicago.bitnet
  30.    goer@midway.uchicago.edu          rutgers!oddjob!ellis!goer
  31.